{extends file="../home.html"}
{block name="title"}{$head_title}{/block}
{block name="css"}
<link rel="stylesheet" type="text/css" href="/Public/Css/front/front_css/sama_part2.css">
<link href="__PUBLIC__/Css/front/css/zhonchou_home.css?version={$version}" type="text/css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Css/front/front_css/refresh_load.css?version={$version}"/>
<style type="text/css">
	#load_wrapper{
	margin-top: 2.2rem;
	}
	.scan_history{
		width: 100%;
		height: 3.0rem;
		border-bottom: 0.05rem solid #efefef;
		background-color: #fff;
		position: relative;
	}
	.history_title{
		width: 90%;
		height: 1.1rem;
		line-height: 1.1rem;
		font-size: 0.8rem;
		color: #323232;
		position: absolute;
		left:3.2%;
		top:0.5rem;
		text-align: left;
		overflow: hidden;/*超出部分隐藏*/
		white-space: nowrap;/*不换行*/
		text-overflow:ellipsis;/*超出部分省略号显示*/
	}
	.history_channel{
		width: 30%;
		height: 0.85rem;
		line-height: 0.85rem;
		font-size: 0.6rem;
		color: #909090;
		position: absolute;
		top:1.75rem;
		left:3.2%;
		text-align: left;
	}
	.scan_time{
		width: 50%;
		text-align: right;
		height: 0.85rem;
		line-height: 0.85rem;
		font-size: 0.6rem;
		color: #909090;
		position: absolute;
		top:1.9rem;
		right: 3.2%;
	}
	.clear_history{
		width: 100%;
		height: 2.5rem;
		background-color: #F6FAFF;
		border-top: 0.05rem solid #e1e1e1;
		color: #323232;
		line-height: 2.5rem;
		text-align: center;
		font-size: 0.9rem;
		position: fixed;
		bottom: 0;
		z-index: 999;
	}
</style>
{/block}
{block name="content"}
<div class="his_concern">
	
	<div class="go_back"></div>
	<p><strong>浏览记录</strong></p>
</div>
<!--没有浏览记录时-->
<div class="no_concern" style="height:31.1rem;{if $browse_list}display: none{/if}">
	<img class="his_detail_icon" src="/Public/Images/front/front_img/icon_nolooklist_personal@3x.png">
	<p class="his_detail_word">暂无历史记录</p>
</div>


{if $browse_list}
<div id="load_wrapper">
	<div id="#scroller">
		<div id="pullDown">
		    <span class="pullDownIcon"></span>
		</div>
		<ul class="concern_content">
				{foreach  from = $browse_list item = this}
				<li class="scan_history">
					<a href="/FrontChannel/post_detail/post_id/{$this.post_id}" class="native_go">
				<span class="history_title">{$this.title}</span>
				<span class="history_channel">{$this.channel_name}</span>
				<span class="scan_time">{$this.addtime}</span>
					</a>
				</li>
				{/foreach}
				
		</ul>
		<div id="pullUp" style="padding-bottom:2.5rem">
			<span class="pullUpIcon"></span><span class="pullUpLabel">上拉加载...</span>
		</div>
	</div>
	<div class="clear_history">清空历史记录</div>
</div>
{/if}

{/block}
{block name="js"}
<script type="text/javascript" src="__PUBLIC__/Js/front/iscroll.js"></script>
<script type="text/javascript" src="__PUBLIC__/Js/front/front_js/my_scan_record.js"></script>
<script>
	var total = parseInt('{$total}')
	var firstRow =  parseInt('{$firstRow}')
</script>
{literal}
<script type="text/javascript">

	var home_banner = new Swiper('.home_banner',{
        pagination: '.swiper-pagination',
        paginationClickable: true,
        autoplay: 2000,//可选选项，自动滑动
    })

	$(function(){
		var imgw = $('.imgbox li').width()
		imgh = $('.imgbox li').height(imgw);

		// 百分比
		$('.line-inner').width($('.line-inner').attr("data-width")+"%")
	})


	
	//清空历史记录
	$('.clear_history').on('click',function(){

		$.ajax({
			type:'post',
			url:'/FrontUserCenter/del_record',
			success:function (data) {
				if(data.code == 1){
					$('#load_wrapper').remove();
					$('.no_concern').show();
				}
			}
		})
	});




</script>
{/literal}
{/block}